home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / lib / devicekit-disks / devkit-disks-helper-change-luks-password < prev    next >
Text File  |  2009-10-23  |  258b  |  16 lines

  1. #!/bin/sh
  2.  
  3. DEVICE=$1
  4. read CURPASS
  5. read NEWPASS
  6.  
  7. if ! echo -e "$CURPASS\n$NEWPASS\n$NEWPASS\n" | /sbin/cryptsetup luksAddKey $DEVICE; then
  8.     exit 1
  9. fi
  10.  
  11. if ! echo -e "$CURPASS\n$NEWPASS\n" | /sbin/cryptsetup luksRemoveKey $DEVICE; then
  12.     exit 1
  13. fi
  14.  
  15. exit 0
  16.